﻿#include"List.h"

void test(){
	LTNode* plist = LTInit();
	//尾插
	LTPushBack(plist, 1);
	LTPushBack(plist, 2);
	LTPushBack(plist, 3);
	LTPushBack(plist, 4);
	LTPrint(plist);
	//销毁链表
	LTDesTroy(&plist);
	plist = NULL;
	LTPrint(plist);

	//查找某个数据在链表中的位置
	/*LTNode* find = LTFind(plist, 2);
	if (find == NULL) {
		printf("没找到\n");
	}
	else {
		printf("找到了\n");
	}
	LTErase(find);
	LTPrint(plist);*/
	//在pos位置之后插⼊数据
	//LTInsert(find, 88);
	
	//头删
	/*LTPopFront(plist);
	LTPrint(plist);
	LTPopFront(plist);
	LTPrint(plist);*/
	//尾删
	/*LTPopBack(plist);
	LTPrint(plist);
	LTPopBack(plist);
	LTPrint(plist);*/
	
	//头插
	/*LTPushFront(plist, 1);
	LTPushFront(plist, 2);
	LTPushFront(plist, 3);
	LTPushFront(plist, 4);*/
	
}
int main() {
	test();
	return 0;
}